package com.homegoods.classify.item;

import android.databinding.ObservableArrayList;
import android.databinding.ObservableField;

import com.homegoods.classify.R;
import com.homegoods.classify.model.GoodsModel;
import com.kedll.library.mvp.BaseItem;

import java.util.List;


/**
 * @author QiQi
 */
public class ADViewItem extends BaseItem {

    public final ObservableField<String> images = new ObservableField<>();
    public final ObservableArrayList<GoodsModel> goodsItems = new ObservableArrayList<>();

    public ADViewItem(Object data) {
        super(data);
    }


    public void setImages(String imgUrl) {
        this.images.set(imgUrl);
    }


    public void setGoodsItems(List<GoodsModel> goodsItems) {
        this.goodsItems.clear();
        this.goodsItems.addAll(goodsItems);
    }

    @Override
    public synchronized int getLayout() {
        return R.layout.classify_head_ad_layout;
    }

}